package com.registration.server.impl;

import com.registration.entity.YlPatientControl;
import com.registration.mapper.YlPatientControlMapper;
import com.registration.server.SickServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SickServerImpl implements SickServer {

    @Autowired
    YlPatientControlMapper ylPatientControlMapper;

    @Override
    public List<YlPatientControl> findAll(int accountId) {
        List<YlPatientControl> all = ylPatientControlMapper.findAll(accountId);
        return all;
    }

    @Override
    public int addSick(YlPatientControl ylPatientControl) {
        return ylPatientControlMapper.addSick(ylPatientControl);
    }

    @Override
    public int deleteSick(int accountId) {
        return ylPatientControlMapper.deleteSick(accountId);
    }

    @Override
    public List<YlPatientControl> findAlla() {
        return ylPatientControlMapper.findAlla();
    }

}
